// ==UserScript==
// @name         马帮统计国家
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @updateURL    https://gitee.com/great-pacey/tampermonkey/raw/master/mabang.copyCountry.user.js
// @author       You
// @match        https://www.mabangerp.com/index.php?*
// @icon         https://www.google.com/s2/favicons?domain=aliexpress.com
// @grant        GM_setClipboard
// @grant        unsafeWindow
// @grant        GM_registerMenuCommand
// ==/UserScript==

(function() {
    GM_registerMenuCommand('复制国家（英文）', function() {
        const result = [].slice.call(document.body.querySelectorAll('.list-body .pct10.text-center')).map(i=>i.innerText.trim().split(/\n/)[1]).join('\n');
        GM_setClipboard(result)
    })
    GM_registerMenuCommand('复制国家（中文）', function() {
        const result = [].slice.call(document.body.querySelectorAll('.list-body .pct10.text-center')).map(i=>i.innerText.trim().split(/\n/)[0]).join('\n');
        GM_setClipboard(result)
    })
})();